docs: Add GtkCalendar to the gallery
authorMatthias Clasen <mclasen@redhat.com>
Mon, 26 Oct 2020 02:32:27 +0000 (22:32 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 26 Oct 2020 02:32:27 +0000 (22:32 -0400)
It has been missing far too long.

docs/reference/gtk/images/calendar.png [new file with mode: 0644]
docs/reference/gtk/meson.build
docs/reference/gtk/visual_index.xml
docs/tools/widgets.c

diff --git a/docs/reference/gtk/images/calendar.png b/docs/reference/gtk/images/calendar.png
new file mode 100644 (file)
index 0000000..7c1f63f
Binary files /dev/null and b/docs/reference/gtk/images/calendar.png differ
index 9f6d915a059068e85bf0073966bdf87b5e509aab..b00bdb52859ec43ec435c1a5dc3236c975dc2fef 100644 (file)
@@ -244,6 +244,7 @@ images = [
   'images/box-packing.png',
   'images/builder-shortcuts.png',
   'images/button.png',
+  'images/calendar.png',
   'images/capture-bubble.png',
   'images/check-button.png',
   'images/checks.png',
index 2ad288451b553bc256447d6f2cee5faa0a4e04c9..990c3228386892c9896f2092489c4cd8767dfd67 100644 (file)
@@ -18,6 +18,7 @@
     <link linkend="GtkSeparator"><inlinegraphic fileref="separator.png" format="PNG"></inlinegraphic></link>
     <link linkend="GtkTextView"><inlinegraphic fileref="multiline-text.png" format="PNG"></inlinegraphic></link>
     <link linkend="GtkScale"><inlinegraphic fileref="scales.png" format="PNG"></inlinegraphic></link>
+    <link linkend="GtkCalendar"><inlinegraphic fileref="calendar.png" format="PNG"></inlinegraphic></link>
     <link linkend="GtkGLArea"><inlinegraphic fileref="glarea.png" format="PNG"></inlinegraphic></link>
     <link linkend="GtkVideo"><inlinegraphic fileref="video.png" format="PNG"></inlinegraphic></link>
     <link linkend="GtkMediaControls"><inlinegraphic fileref="media-controls.png" format="PNG"></inlinegraphic></link>
index f324f4fb42bd2904b0fe40a5a86ee6b602fe5c74..04c6882140901eb3032f3c44322a2b2d7cc81f05 100644 (file)
@@ -1536,6 +1536,25 @@ create_window_controls (void)
   return new_widget_info ("windowcontrols", vbox, SMALL);
 }
 
+static WidgetInfo *
+create_calendar (void)
+{
+  GtkWidget *widget;
+  GtkWidget *vbox;
+
+  widget = gtk_calendar_new ();
+
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+  gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
+  gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+  gtk_box_append (GTK_BOX (vbox), widget);
+  gtk_box_append (GTK_BOX (vbox), gtk_label_new ("Calendar"));
+
+  add_margin (vbox);
+
+  return new_widget_info ("calendar", vbox, MEDIUM);
+}
+
 GList *
 get_all_widgets (void)
 {
@@ -1602,6 +1621,7 @@ get_all_widgets (void)
   retval = g_list_prepend (retval, create_editable_label ());
   retval = g_list_prepend (retval, create_drop_down ());
   retval = g_list_prepend (retval, create_window_controls ());
+  retval = g_list_prepend (retval, create_calendar ());
 
   return retval;
 }